<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>cookie</title>
	<script type="text/javascript" src="../js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="../js/jquery.cookie.js"></script>
	<script type="text/javascript">
		
		// cookie的读和写均要在服务器环境下

		// 写cookie
		$.cookie('mycookie','ok',{expires:7,path:'/'});

		// 读cookie
		var val = $.cookie('mycookie');
		alert(val);
	</script>
</head>
<body>
	
</body>
</html>